﻿using System;
using System.Collections.Generic;

namespace DataLayer.Repo
{
    public interface IRepository<T>
    {
        T GetById(int id);
        T GetByName(string name);
        void Add(T entity);
        void Update(T entity);
        void Remove(T entity);
        ICollection<T> FindAll();
        void AddRange(ICollection<T> entities);

        event EventHandler<RepositoryDataChangedArgs<T>> DataChanged;
    }
}
